package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ProductHistoryMapper;
import com.ruoyi.system.domain.ProductHistory;
import com.ruoyi.system.service.IProductHistoryService;

/**
 * zhangService业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-11
 */
@Service
public class ProductHistoryServiceImpl implements IProductHistoryService 
{
    @Autowired
    private ProductHistoryMapper productHistoryMapper;

    /**
     * 查询zhang
     * 
     * @param id zhang主键
     * @return zhang
     */
    @Override
    public ProductHistory selectProductHistoryById(String id)
    {
        return productHistoryMapper.selectProductHistoryById(id);
    }

    /**
     * 查询zhang列表
     * 
     * @param productHistory zhang
     * @return zhang
     */
    @Override
    public List<ProductHistory> selectProductHistoryList(ProductHistory productHistory)
    {
        return productHistoryMapper.selectProductHistoryList(productHistory);
    }

    /**
     * 新增zhang
     * 
     * @param productHistory zhang
     * @return 结果
     */
    @Override
    public int insertProductHistory(ProductHistory productHistory)
    {
        productHistory.setCreateTime(DateUtils.getNowDate());
        return productHistoryMapper.insertProductHistory(productHistory);
    }

    /**
     * 修改zhang
     * 
     * @param productHistory zhang
     * @return 结果
     */
    @Override
    public int updateProductHistory(ProductHistory productHistory)
    {
        return productHistoryMapper.updateProductHistory(productHistory);
    }

    /**
     * 批量删除zhang
     * 
     * @param ids 需要删除的zhang主键
     * @return 结果
     */
    @Override
    public int deleteProductHistoryByIds(Long[] ids)
    {
        return productHistoryMapper.deleteProductHistoryByIds(ids);
    }

    /**
     * 删除zhang信息
     * 
     * @param id zhang主键
     * @return 结果
     */
    @Override
    public int deleteProductHistoryById(Long id)
    {
        return productHistoryMapper.deleteProductHistoryById(id);
    }
}
